<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: jetson-utils/logging.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('logging_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">logging.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="logging_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * copy of this software and associated documentation files (the &quot;Software&quot;),</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * to deal in the Software without restriction, including without limitation</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * the rights to use, copy, modify, merge, publish, distribute, sublicense,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * and/or sell copies of the Software, and to permit persons to whom the</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * Software is furnished to do so, subject to the following conditions:</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * all copies or substantial portions of the Software.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __LOGGING_UTILS_H_</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __LOGGING_UTILS_H_</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="commandLine_8h.html">commandLine.h</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160; </div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="group__log.html#ga28f8a04ffc482319c4b5256655b650b5">   36</a></span>&#160;<span class="preprocessor">#define LOG_USAGE_STRING  &quot;logging arguments: \n&quot;                                                                       \</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">                  &quot;  --log-file=FILE        output destination file (default is stdout)\n&quot;                      \</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">                  &quot;  --log-level=LEVEL      message output threshold, one of the following:\n&quot;          \</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">                  &quot;                             * silent\n&quot;                                                                     \</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">                  &quot;                             * error\n&quot;                                                                      \</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">                  &quot;                             * warning\n&quot;                                                                    \</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">                  &quot;                             * success\n&quot;                                                                    \</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">                  &quot;                             * info\n&quot;                                                                       \</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">                  &quot;                             * verbose (default)\n&quot;                                                  \</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">                  &quot;                             * debug\n&quot;                                                                      \</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">                  &quot;  --verbose              enable verbose logging (same as --log-level=verbose)\n&quot;  \</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">                  &quot;  --debug                enable debug logging   (same as --log-level=debug)\n\n&quot;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="group__log.html">   54</a></span>&#160;<span class="keyword">class </span><a class="code" href="group__log.html#classLog">Log</a></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;{</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531e">   61</a></span>&#160;        <span class="keyword">enum</span> <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531e">Level</a></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;        {</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531eabfeaf96ee427cb4a1e58079fe56d6659">   63</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531eabfeaf96ee427cb4a1e58079fe56d6659">SILENT</a>=0,                </div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531ea4cd0be82d98ca2a542adc75f2c826e5b">   64</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ea4cd0be82d98ca2a542adc75f2c826e5b">ERROR</a>,           </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531ea3af89ac37cc3e24957e7901211345e96">   65</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ea3af89ac37cc3e24957e7901211345e96">WARNING</a>,                 </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531ead5214ff9471f920797b08c249706ab69">   66</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ead5214ff9471f920797b08c249706ab69">SUCCESS</a>,                 </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531ea8ddc7ebe42544ebab9b3d6cf49ab33d8">   67</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ea8ddc7ebe42544ebab9b3d6cf49ab33d8">INFO</a>,            </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531ea0763041e407c0324563ab6aff02b11ee">   68</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ea0763041e407c0324563ab6aff02b11ee">VERBOSE</a>,                 </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531ea4e49113de847d4ce568b7f0d5647a715">   69</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ea4e49113de847d4ce568b7f0d5647a715">DEBUG</a>,           </div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="group__log.html#afb5d4c945d835d194a295461d752531ea04f2e465914e7dd3f9c981ddd603e8e6">   70</a></span>&#160;                <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ea04f2e465914e7dd3f9c981ddd603e8e6">DEFAULT</a>=<a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531ea0763041e407c0324563ab6aff02b11ee">VERBOSE</a> </div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;        };</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="group__log.html#a1e0dae8692350761b8809693789f31ce">   76</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531e">Level</a> <a class="code" href="group__log.html#a1e0dae8692350761b8809693789f31ce">GetLevel</a>()                  { <span class="keywordflow">return</span> <a class="code" href="group__log.html#a896bac37ef2440e3d2ed3a62745fe0df">mLevel</a>; }</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="group__log.html#a8dad02e089ddac13fb2f711143c2fc0d">   81</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__log.html#a8dad02e089ddac13fb2f711143c2fc0d">SetLevel</a>( <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531e">Level</a> level )      { <a class="code" href="group__log.html#a896bac37ef2440e3d2ed3a62745fe0df">mLevel</a> = level; }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="group__log.html#af041fc113d4bc1c646e592d2b557c478">   86</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">inline</span> FILE* <a class="code" href="group__log.html#af041fc113d4bc1c646e592d2b557c478">GetFile</a>()                           { <span class="keywordflow">return</span> <a class="code" href="group__log.html#a560b1e5aa606f40e708d95ae6739ffb8">mFile</a>; }</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="group__log.html#a13f5e0d46c9fff3b676fdd54e69c9ece">   92</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__log.html#a13f5e0d46c9fff3b676fdd54e69c9ece">GetFilename</a>()         { <span class="keywordflow">return</span> <a class="code" href="group__log.html#a868d2e3c70c675aab339194e442347b0">mFilename</a>.c_str(); }</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__log.html#a5f77b78fa8f1f8a0ce240fcec82d6ba1">SetFile</a>( FILE* file );</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__log.html#a5f77b78fa8f1f8a0ce240fcec82d6ba1">SetFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* filename );</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="group__log.html#aadbed1bc324f43b62a977d63f8dee534">  110</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__log.html#aadbed1bc324f43b62a977d63f8dee534">Usage</a>()                       { <span class="keywordflow">return</span> <a class="code" href="group__log.html#ga28f8a04ffc482319c4b5256655b650b5">LOG_USAGE_STRING</a>; }</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__log.html#a3a81af53022c6d286a9341676ad778cd">ParseCmdLine</a>( <span class="keyword">const</span> <span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>** argv );</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="group__log.html#a3a81af53022c6d286a9341676ad778cd">ParseCmdLine</a>( <span class="keyword">const</span> <a class="code" href="group__commandLine.html#classcommandLine">commandLine</a>&amp; cmdLine );</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160; </div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="group__log.html#ad99543fb936b6448fc857a9db0751dc4">LevelToStr</a>( <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531e">Level</a> level );</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keyword">static</span> <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531e">Level</a> <a class="code" href="group__log.html#ad4cfaba5c57f7ae9bb549326ce4842f4">LevelFromStr</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* str );</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="group__log.html#a896bac37ef2440e3d2ed3a62745fe0df">  133</a></span>&#160;        <span class="keyword">static</span> <a class="code" href="group__log.html#afb5d4c945d835d194a295461d752531e">Level</a>        <a class="code" href="group__log.html#a896bac37ef2440e3d2ed3a62745fe0df">mLevel</a>;</div>
<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="group__log.html#a560b1e5aa606f40e708d95ae6739ffb8">  134</a></span>&#160;        <span class="keyword">static</span> FILE*        <a class="code" href="group__log.html#a560b1e5aa606f40e708d95ae6739ffb8">mFile</a>;</div>
<div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="group__log.html#a868d2e3c70c675aab339194e442347b0">  135</a></span>&#160;        <span class="keyword">static</span> std::string <a class="code" href="group__log.html#a868d2e3c70c675aab339194e442347b0">mFilename</a>;</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;};</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160; </div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="group__log.html#gafb70c38315345d6bae6a42a80f611cd0">  144</a></span>&#160;<span class="preprocessor">#define GenericLogMessage(level, format, args...) if( level &lt;= Log::GetLevel() ) fprintf(Log::GetFile(), format, ## args)</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="group__log.html#ga0f3919667d0ac0b001e44edb569d22fe">  150</a></span>&#160;<span class="preprocessor">#define LogError(format, args...)               GenericLogMessage(Log::ERROR, LOG_COLOR_RED LOG_LEVEL_PREFIX_ERROR format LOG_COLOR_RESET, ## args)</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160; </div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="group__log.html#ga923829d777617140de2576c40e3880ed">  156</a></span>&#160;<span class="preprocessor">#define LogWarning(format, args...)     GenericLogMessage(Log::WARNING, LOG_COLOR_YELLOW LOG_LEVEL_PREFIX_WARNING format LOG_COLOR_RESET, ## args)</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160; </div>
<div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="group__log.html#ga8eabfc6e4b353de9c96b1e43f7d62fcd">  162</a></span>&#160;<span class="preprocessor">#define LogSuccess(format, args...)     GenericLogMessage(Log::SUCCESS, LOG_COLOR_GREEN LOG_LEVEL_PREFIX_SUCCESS format LOG_COLOR_RESET, ## args)</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160; </div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="group__log.html#ga228a21f91213b15d7fdce08182d825e8">  168</a></span>&#160;<span class="preprocessor">#define LogInfo(format, args...)                GenericLogMessage(Log::INFO, LOG_LEVEL_PREFIX_INFO format, ## args)</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="group__log.html#ga98544477d87d57d0b8e2b3ac03481785">  174</a></span>&#160;<span class="preprocessor">#define LogVerbose(format, args...)     GenericLogMessage(Log::VERBOSE, LOG_LEVEL_PREFIX_VERBOSE format, ## args)</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160; </div>
<div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="group__log.html#ga210ef343f0bc7d17a786ea6ea882f2d9">  180</a></span>&#160;<span class="preprocessor">#define LogDebug(format, args...)               GenericLogMessage(Log::DEBUG, LOG_LEVEL_PREFIX_DEBUG format, ## args)</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160; </div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="preprocessor">#ifdef LOG_DISABLE_COLORS</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;<span class="preprocessor">        #define LOG_COLOR_RESET      &quot;&quot;</span></div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor">        #define LOG_COLOR_RED        &quot;&quot;</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;<span class="preprocessor">        #define LOG_COLOR_GREEN      &quot;&quot;</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<span class="preprocessor">        #define LOG_COLOR_YELLOW     &quot;&quot;</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;<span class="preprocessor">        #define LOG_COLOR_BLUE       &quot;&quot;</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;<span class="preprocessor">        #define LOG_COLOR_MAGENTA    &quot;&quot;</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="preprocessor">        #define LOG_COLOR_CYAN       &quot;&quot;</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;<span class="preprocessor">        #define LOG_COLOR_LIGHT_GRAY &quot;&quot;</span></div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="preprocessor">        #define LOG_COLOR_DARK_GRAY  &quot;&quot;</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="comment">// https://misc.flogisoft.com/bash/tip_colors_and_formatting</span></div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="logging_8h.html#a8878b128231510acd20620de417738e9">  203</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_RESET      &quot;\033[0m&quot;</span></div>
<div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="logging_8h.html#af6467cd567c0679c15e09913f77b9555">  204</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_RED        &quot;\033[0;31m&quot;</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="logging_8h.html#ab3f1028e542649d3ad064ca8b9b123c0">  205</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_GREEN      &quot;\033[0;32m&quot;</span></div>
<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="logging_8h.html#a74416ee2437694c75a11e27a158eeb5c">  206</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_YELLOW     &quot;\033[0;33m&quot;</span></div>
<div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="logging_8h.html#a10b19bd4d5d95ce6133e146d4054f307">  207</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_BLUE       &quot;\033[0;34m&quot;</span></div>
<div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="logging_8h.html#a60dbdafd43ffcb6fd7eec8319326d98b">  208</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_MAGENTA    &quot;\033[0;35m&quot;</span></div>
<div class="line"><a name="l00209"></a><span class="lineno"><a class="line" href="logging_8h.html#ac55e82ec5cb5e2dd18681cba15335f7a">  209</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_CYAN       &quot;\033[0;36m&quot;</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="logging_8h.html#a35d994f3cf7e5c4f48b492b3bf8eb025">  210</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_LIGHT_GRAY &quot;\033[0;37m&quot;</span></div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="logging_8h.html#ac8d55f70f2cbe3969a913534341e68c5">  211</a></span>&#160;<span class="preprocessor">        #define LOG_COLOR_DARK_GRAY  &quot;\033[0;90m&quot;</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160; </div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="preprocessor">#ifdef LOG_ENABLE_LEVEL_PREFIX</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_ERROR  &quot;[E]&quot;</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_WARNING        &quot;[W]&quot;</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_SUCCESS        &quot;[S]&quot;</span></div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_INFO           &quot;[I]&quot;</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_VERBOSE        &quot;[V]&quot;</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_DEBUG  &quot;[D]&quot;</span></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="logging_8h.html#a06e2b7a43c603fa725f6481ffc54f886">  222</a></span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_ERROR  &quot;&quot;</span></div>
<div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="logging_8h.html#a41ab2149833532498c42b857df8e6e9b">  223</a></span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_WARNING        &quot;&quot;</span></div>
<div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="logging_8h.html#a0209ff584cc9d36738abaa9a24342b66">  224</a></span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_SUCCESS        &quot;&quot;</span></div>
<div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="logging_8h.html#ae9e2a457f12906e64eb3a4a0cd1b0ac9">  225</a></span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_INFO           &quot;&quot;</span></div>
<div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="logging_8h.html#acffad580d034d48e5eb8939e45d1de4d">  226</a></span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_VERBOSE        &quot;&quot;</span></div>
<div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="logging_8h.html#a82bae11ee85a2eaafa154e291300c048">  227</a></span>&#160;<span class="preprocessor">        #define LOG_LEVEL_PREFIX_DEBUG  &quot;&quot;</span></div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160; </div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160; </div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="agroup__log_html_aadbed1bc324f43b62a977d63f8dee534"><div class="ttname"><a href="group__log.html#aadbed1bc324f43b62a977d63f8dee534">Log::Usage</a></div><div class="ttdeci">static const char * Usage()</div><div class="ttdoc">Usage string for command line arguments to Create()</div><div class="ttdef"><b>Definition:</b> logging.h:110</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531e"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531e">Log::Level</a></div><div class="ttdeci">Level</div><div class="ttdoc">Defines the logging level of a message, and the threshold used by the logger to either drop or output...</div><div class="ttdef"><b>Definition:</b> logging.h:61</div></div>
<div class="ttc" id="agroup__log_html_ad99543fb936b6448fc857a9db0751dc4"><div class="ttname"><a href="group__log.html#ad99543fb936b6448fc857a9db0751dc4">Log::LevelToStr</a></div><div class="ttdeci">static const char * LevelToStr(Level level)</div><div class="ttdoc">Convert a logging level to string.</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531ea04f2e465914e7dd3f9c981ddd603e8e6"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531ea04f2e465914e7dd3f9c981ddd603e8e6">Log::DEFAULT</a></div><div class="ttdeci">@ DEFAULT</div><div class="ttdoc">The default level is VERBOSE</div><div class="ttdef"><b>Definition:</b> logging.h:70</div></div>
<div class="ttc" id="agroup__log_html_a5f77b78fa8f1f8a0ce240fcec82d6ba1"><div class="ttname"><a href="group__log.html#a5f77b78fa8f1f8a0ce240fcec82d6ba1">Log::SetFile</a></div><div class="ttdeci">static void SetFile(FILE *file)</div><div class="ttdoc">Set the logging output.</div></div>
<div class="ttc" id="acommandLine_8h_html"><div class="ttname"><a href="commandLine_8h.html">commandLine.h</a></div></div>
<div class="ttc" id="agroup__log_html_a8dad02e089ddac13fb2f711143c2fc0d"><div class="ttname"><a href="group__log.html#a8dad02e089ddac13fb2f711143c2fc0d">Log::SetLevel</a></div><div class="ttdeci">static void SetLevel(Level level)</div><div class="ttdoc">Set the current logging level.</div><div class="ttdef"><b>Definition:</b> logging.h:81</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531ea3af89ac37cc3e24957e7901211345e96"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531ea3af89ac37cc3e24957e7901211345e96">Log::WARNING</a></div><div class="ttdeci">@ WARNING</div><div class="ttdoc">Warning conditions where the application may be able to proceed in some capacity.</div><div class="ttdef"><b>Definition:</b> logging.h:65</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531ea0763041e407c0324563ab6aff02b11ee"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531ea0763041e407c0324563ab6aff02b11ee">Log::VERBOSE</a></div><div class="ttdeci">@ VERBOSE</div><div class="ttdoc">Verbose details about program execution.</div><div class="ttdef"><b>Definition:</b> logging.h:68</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531eabfeaf96ee427cb4a1e58079fe56d6659"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531eabfeaf96ee427cb4a1e58079fe56d6659">Log::SILENT</a></div><div class="ttdeci">@ SILENT</div><div class="ttdoc">No messages are output.</div><div class="ttdef"><b>Definition:</b> logging.h:63</div></div>
<div class="ttc" id="agroup__log_html_a896bac37ef2440e3d2ed3a62745fe0df"><div class="ttname"><a href="group__log.html#a896bac37ef2440e3d2ed3a62745fe0df">Log::mLevel</a></div><div class="ttdeci">static Level mLevel</div><div class="ttdef"><b>Definition:</b> logging.h:133</div></div>
<div class="ttc" id="agroup__log_html_a13f5e0d46c9fff3b676fdd54e69c9ece"><div class="ttname"><a href="group__log.html#a13f5e0d46c9fff3b676fdd54e69c9ece">Log::GetFilename</a></div><div class="ttdeci">static const char * GetFilename()</div><div class="ttdoc">Get the filename of the log output.</div><div class="ttdef"><b>Definition:</b> logging.h:92</div></div>
<div class="ttc" id="agroup__log_html_ad4cfaba5c57f7ae9bb549326ce4842f4"><div class="ttname"><a href="group__log.html#ad4cfaba5c57f7ae9bb549326ce4842f4">Log::LevelFromStr</a></div><div class="ttdeci">static Level LevelFromStr(const char *str)</div><div class="ttdoc">Parse a logging level from a string.</div></div>
<div class="ttc" id="agroup__log_html_a1e0dae8692350761b8809693789f31ce"><div class="ttname"><a href="group__log.html#a1e0dae8692350761b8809693789f31ce">Log::GetLevel</a></div><div class="ttdeci">static Level GetLevel()</div><div class="ttdoc">Get the current logging level.</div><div class="ttdef"><b>Definition:</b> logging.h:76</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531ead5214ff9471f920797b08c249706ab69"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531ead5214ff9471f920797b08c249706ab69">Log::SUCCESS</a></div><div class="ttdeci">@ SUCCESS</div><div class="ttdoc">Successful events (e.g.</div><div class="ttdef"><b>Definition:</b> logging.h:66</div></div>
<div class="ttc" id="agroup__log_html_a868d2e3c70c675aab339194e442347b0"><div class="ttname"><a href="group__log.html#a868d2e3c70c675aab339194e442347b0">Log::mFilename</a></div><div class="ttdeci">static std::string mFilename</div><div class="ttdef"><b>Definition:</b> logging.h:135</div></div>
<div class="ttc" id="agroup__log_html_classLog"><div class="ttname"><a href="group__log.html#classLog">Log</a></div><div class="ttdoc">Message logging with a variable level of output and destinations.</div><div class="ttdef"><b>Definition:</b> logging.h:54</div></div>
<div class="ttc" id="agroup__log_html_a560b1e5aa606f40e708d95ae6739ffb8"><div class="ttname"><a href="group__log.html#a560b1e5aa606f40e708d95ae6739ffb8">Log::mFile</a></div><div class="ttdeci">static FILE * mFile</div><div class="ttdef"><b>Definition:</b> logging.h:134</div></div>
<div class="ttc" id="agroup__log_html_ga28f8a04ffc482319c4b5256655b650b5"><div class="ttname"><a href="group__log.html#ga28f8a04ffc482319c4b5256655b650b5">LOG_USAGE_STRING</a></div><div class="ttdeci">#define LOG_USAGE_STRING</div><div class="ttdoc">Standard command-line options able to be passed to videoOutput::Create()</div><div class="ttdef"><b>Definition:</b> logging.h:36</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531ea8ddc7ebe42544ebab9b3d6cf49ab33d8"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531ea8ddc7ebe42544ebab9b3d6cf49ab33d8">Log::INFO</a></div><div class="ttdeci">@ INFO</div><div class="ttdoc">Informational messages that are more important than VERBOSE messages.</div><div class="ttdef"><b>Definition:</b> logging.h:67</div></div>
<div class="ttc" id="agroup__log_html_a3a81af53022c6d286a9341676ad778cd"><div class="ttname"><a href="group__log.html#a3a81af53022c6d286a9341676ad778cd">Log::ParseCmdLine</a></div><div class="ttdeci">static void ParseCmdLine(const int argc, char **argv)</div><div class="ttdoc">Parse command line options (see Usage() above)</div></div>
<div class="ttc" id="agroup__commandLine_html_classcommandLine"><div class="ttname"><a href="group__commandLine.html#classcommandLine">commandLine</a></div><div class="ttdoc">Command line parser for extracting flags, values, and strings.</div><div class="ttdef"><b>Definition:</b> commandLine.h:35</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531ea4cd0be82d98ca2a542adc75f2c826e5b"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531ea4cd0be82d98ca2a542adc75f2c826e5b">Log::ERROR</a></div><div class="ttdeci">@ ERROR</div><div class="ttdoc">Major errors that may impact application execution.</div><div class="ttdef"><b>Definition:</b> logging.h:64</div></div>
<div class="ttc" id="agroup__log_html_af041fc113d4bc1c646e592d2b557c478"><div class="ttname"><a href="group__log.html#af041fc113d4bc1c646e592d2b557c478">Log::GetFile</a></div><div class="ttdeci">static FILE * GetFile()</div><div class="ttdoc">Get the current log output.</div><div class="ttdef"><b>Definition:</b> logging.h:86</div></div>
<div class="ttc" id="agroup__log_html_afb5d4c945d835d194a295461d752531ea4e49113de847d4ce568b7f0d5647a715"><div class="ttname"><a href="group__log.html#afb5d4c945d835d194a295461d752531ea4e49113de847d4ce568b7f0d5647a715">Log::DEBUG</a></div><div class="ttdeci">@ DEBUG</div><div class="ttdoc">Low-level debugging (disabled by default)</div><div class="ttdef"><b>Definition:</b> logging.h:69</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_54a0acf6da04fe2ed9410b4c6369bc5d.html">jetson-utils</a></li><li class="navelem"><a class="el" href="logging_8h.html">logging.h</a></li>
    <li class="footer">Generated on Tue Mar 28 2023 14:27:58 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
